using System;

namespace RpgServiceLib.Quest
{
	public class QuestChangeEvent
	{
		public virtual QuestChangeType QuestChangeType { get; private set;}
		public virtual IQuest Quest { get; private set;}
		public virtual object ValueBefore { get; private set; }
		public virtual object ValueNowOrEventType { get; private set; }
		public virtual QuestChangeAllowedType Allowed { get; private set; }
	
		public QuestChangeEvent (IQuest quest, QuestChangeAllowedType allowed, QuestChangeType type, object valueBefore, object valueNow)
		{
			this.Quest = quest;
			this.QuestChangeType = type;
			this.ValueBefore = valueBefore;
			this.ValueNowOrEventType = valueNow;
			this.Allowed = allowed;
		}
		public QuestChangeEvent (IQuest quest, QuestChangeType type, object valueBefore, object valueNow)
		{
			this.Quest = quest;
			this.QuestChangeType = type;
			this.ValueBefore = valueBefore;
			this.ValueNowOrEventType = valueNow;
			this.Allowed = QuestChangeAllowedType.IsOk;
		}		
	}
}

